import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import SelfHelp from '../views/SelfHelp.vue'
import Login from '../views/Login.vue'
import Arraign from '../views/Arraign.vue'
import Room from '../views/Room.vue'
import Duty from '../views/Duty.vue'
import Inner from '../views/Inner.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/home',
    name: 'Home',
    component: Home
  },
  {
    path: '/login',
    name: 'Login',
    component: Login,
    meta: {
      userType: 'login'
    }
  },
  {
    path: '/',
    name: 'Login',
    component: Login,
    meta: {
      userType: 'login'
    }
  },
  {
    path: '/selfHelp',
    name: 'SelfHelp',
    component: SelfHelp,
    meta: {
      userType: 'selfHelp'
    }
  },
  {
    path: '/arraign',
    name: 'Arraign',
    component: Arraign,
    meta: {
      userType: 'arraign'
    }
  },
  {
    path: '/room',
    name: 'Room',
    component: Room,
    meta: {
      userType: 'room'
    }
  },
  {
    path: '/duty',
    name: 'Duty',
    component: Duty,
    meta: {
      userType: 'duty'
    }
  },
  {
    path: '/inner',
    name: 'Inner',
    component: Inner,
    meta: {
      userType: 'inner'
    }
  },
  {
    path: '/comparison',
    name: 'comparison',
    component: () => import('@/views/comparison'),
    meta: {
      userType: 'comparison'
    }
  }

]

const router = new VueRouter({
  // mode: 'history',
  // base: '/baoshan/meeting',
  routes
})

export default router
